<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>菜鸟教程</title>
  </head>
  <body>
    <script type="text/javascript">
      var a1 = "zhangsanlisiwangwu";
      var a2 = 29;
      var a3 = true;

      var a4 = [1, 2, 3];
      var a5 = { name: "zhangsan", age: 28 };

      var a6 = null;
      var a7 = undefined;

      console.log(a1.toString());
      console.log(a2.toString());
      console.log(a3.toString());
      console.log(a4.toString());
      console.log(a5.toString());

      // 以下代码打印报错
      // console.log(a6.toString());
      // console.log(a7.toString());
    </script>
  </body>
</html>
